<!-- start content--->
<div id="content"> 
      <div class="top1">
            <div class="left"> </div>
            <div class="right"></div>
            <div class="center">
           <h1 class="heading"><?php echo $heading_title; ?> <?php if($allow_edit){?><a href="?m=address&act=edit&id=<?php echo $address['info_address_id'];?>">  [Sua]</a><?php }?>  </h1>
            </div>
      </div>
      <div class="middle"> <!--start miiddlwe -->
             <div style="width: 100%; margin-bottom: 30px;"><!-- start group -->
                 <table style="width: 100%; border-collapse: collapse;">
                      <tr>
                         <td style="text-align: center; width: 150px; vertical-align: top; ">
                             <img src="view/theme/default/image/music.jpg" width="150" height="150" border="1" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" style="margin-bottom: 3px;" /><br />
                             
                         </td>
                         <td style="padding-left: 15px; width: 296px; vertical-align: top;">
                            <table width="100%"><!--table2-->
                                 <tr>
                                      <td><b>Tên bài hát</b></td>
                                      <td><?php echo $song['song_name'];?></td>
                                 </tr>
                                  <tr>
                                      <td><b>Sáng tác</b></td>
                                      <td><?php echo $song['author_name'];?></td>
                                 </tr>
                                 
                                 <?php if( $song['name']) {?>
                                 <tr>
                                    <td><b>Trình bày</b></td>
                                    <td><?php echo $song['name'];?></td>
                                 </tr>
              		             	<?php }?>

                                 
                                  
                                     <tr>
                                        <td><b>Lượt xem</b></td>
                                        <td><?php echo $song['viewed'];?></td>
                                     </tr>
                                    <tr>
                                        <td><b> <a href="<?php echo $song['linkdown']; ?>">Tải về</a></b></td>
                                        <td><?php echo $song['taive'];?></td>
                                     </tr>
                                   
                                      <tr>
                                        <td><b>Google +</b></td>
                                        <td><g:plusone size="small"></g:plusone> </td>
                                     </tr>
                                     <tr>
                                        <td><b>Báo cáo xấu</b></td>
                                        <td>Bao cao <?php echo $song['song_id'];?></td>
                                     </tr>
					 <tr>
                                       <td></td>
                                        <td></td>
                                     </tr>


		                     </table> <!-- end table2-->
                               <!-- AddThis Button BEGIN -->
                                <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
                                <a class="addthis_button_preferred_1"></a>
                                <a class="addthis_button_preferred_2"></a>
                                <a class="addthis_button_preferred_3"></a>
                                <a class="addthis_button_preferred_4"></a>
                                <a class="addthis_button_compact"></a>
                                </div>
                                <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
                                <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4d94c1575c37062d"></script>
                                <!-- AddThis Button END --
                                     <img src ="view/theme/default/image/icon_share.png"/>
                                <!-- khi offline -->
                      </td>
                  </tr>
         </table> 
    </div> <!-- end group -->
   
   <div class="groupmusic">
     <div id='mediaspace'>This text will be replaced</div>
		  <script type='text/javascript'>
		  jwplayer('mediaspace').setup({
		    'flashplayer': 'view/javascript/mediaplayer/player.swf',
		    'file': './media/<?php echo $linksong; echo "?pl"; ?>',
		    'image':'view/javascript/mediaplayer/preview.jpg',
		    'controlbar': 'bottom',
		    'width': '570',
		    'height': '350'
		  });
		</script>
  
   </div>
  
    <div class="tabs">
      <a tab="#tab_description">Lời bài hát</a>
      <a tab="#tab_comment">Ý kiến thảo luận</a>
     <!--
      <a tab="#tab_additional">Bai viet bo sung </a>
      -->
    </div>
    <!-- note for address-->
    <div id="tab_description" class="tab_page">
    <p align="justify">   <?php echo $song['lyric'];?></p>
    <hr />
    Bài hát này có <?php echo $song['viewed'];?> lượt xem. Viết bởi <?php echo $song['full_name'];?> - <?php echo $song['add_date'];?>
    </div>
   <!-- end note for address-->
   <div id="tab_comment" class="tab_page"><!-- start comment-->
      <div id="review"></div>
          <div class="black.heading" id="review_title">Đăng ý kiến thảo luận của bạn</div>
        
          <div class="comment_div"> <!-- b cm -->
               <?php if((GUEST_COMMENT =='1')&&($_SESSION['user_id']=="")){?>
               <b>Email của bạn</b><br/>
               <input type="text" name="author" size="40"/>
               <?php }?>
               <input type="hidden" name="user_id" value="<?php echo $_SESSION['user_id'];?>" />
               <br />
               <b>Nội dung</b>
               <textarea name="content" style="width: 98%;" rows="8"></textarea>
               <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
               <br />
               <?php if(GUEST_COMMENT =='1'){?>
               <b>Mã xác nhận</b><br />
               <img src="<?php echo $captcha;?>" id="captcha" /><br/>
               <input type="text" name="captcha" size="6"  autocomplete="off" />
               <br />
               <?php } ?>
         </div> <!-- e cm -->
           
           <div class="buttons"> <!-- b btn -->
            <table>
              <tr>
                <td align="right"><a onclick="review();" class="button"><span><?php echo "Gửi đi"; ?></span></a></td>
              </tr>
            </table>
          </div><!-- e btn -->

     </div> <!-- end tab_comment -->
    
       
        <div class="group"><!-- cac bai lien quan -->
                   <p><b>Các các khúc khác về <?php echo $address['info_address_name'];?> </b></p>
                    <ul class="additional">
                   <?php foreach($list as $songlist){?>
                   <?php if(REWRITE==0){?> 
		   <li><a href = "./?m=song&act=view&id=<?php echo $songlist['song_id']; ?>" title="<?php echo $songlist['song_name'];?>"><?php echo $songlist['song_name'];?></a></li>
                    <?php }else{?>
                    <li><a href = "./ca-khuc-ve-son-la-<?php echo $songlist['song_id']; ?>-<?php echo $songlist['4']; ?>" title="<?php echo $songlist['song_name'];?>"><?php echo $songlist['song_name'];?></a></li>
		   <?php }?>
                   <?php }?>
                   </ul>
                   <hr /><ul class="w"><li><a href ="<?php echo $write; ?>" >Viết bài bổ sung</a></li></ul>
        </div> <!-- end cac bai lien quan -->
        
      </div> <!--end middle-->
      
      <div class="bottom"> <!-- bgin botom-->
          <div class="left"></div>
          <div class="right"></div>
          <div class="center"></div>
      </div><!-- end botom -->
</div><!-- end content -->

<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').slideUp('slow');
		
	$('#review').load(this.href);
	
	$('#review').slideDown('slow');
	
	return false;
});			

$('#review').load('?m=address&act=list_comment&id=<?php echo $address['info_address_id']; ?>');

function review() {
	$.ajax({
		type: 'POST',
		url: '?m=address&act=comment&id=<?php echo $address['info_address_id']; ?>',
		dataType: 'json',
		data: 'author=' + encodeURIComponent($('input[name=\'author\']').val()) + '&user_id=' + encodeURIComponent($('input[name=\'user_id\']').val()) + '&content=' + encodeURIComponent($('textarea[name=\'content\']').val()) + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#review_button').attr('disabled', 'disabled');
			$('#review_title').after('<div class="wait"><img src="view/theme/default/image/loading_1.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#review_button').attr('disabled', '');
			$('.wait').remove();
		},
		success: function(data) {
			if (data.error) {
				$('#review_title').after('<div class="warning">' + data.error + '</div>');
			}
			
			if (data.success) {
				$('#review_title').after('<div class="success">' + data.success + '</div>');
			    $('input[name=\'author\']').val('');				
				$('input[name=\'user_id\']').val('');
				$('textarea[name=\'content\']').val('');
			    $('input[name=\'captcha\']').val('');
			}
		}
	});
}
//--></script>
<script type="text/javascript"><!--
$.tabs('.tabs a'); 
//--></script>

